const nums = [1, 2, 3, "2", "b", "a", 1, 3];

/* console.log(nums.filter((v) => typeof v !== "string"));

for (let i = 0; i < nums.length; i++) {
  const cur = nums[i];
  if (typeof cur === "string") {
    nums.splice(i, 1);
    i--;
  }
}
console.log(nums); */

const ret = [];
for (let i = 0; i < nums.length; i++) {
  const cur = nums[i];
  if (!ret.includes(cur)) {
    ret.push(cur);
  }
}

console.log(ret);
